package com.food.dao.service;

import java.sql.Date;
import java.util.List;

import com.food.dao.CourseDAOJdbc;
import com.food.dao.in.CourseDAO;
import com.food.model.Course;

public class CourseService {
	CourseDAO dao = new CourseDAOJdbc();
	public void insertCourse(Course bean){
		dao.insertCourse(bean);
	}
	public void updateCourse(Course bean){
		dao.updateCourse(bean.getCname(),bean.getCteacher(),bean.getCstartdate(),
				bean.getCenddate(),bean.getCpeople(),bean.getCplace(),bean.getCprice() ,
				bean.getCintroduce(), bean.getCid());
	}
	public void deleteCourse(Course bean){
		dao.deleteCourse(bean.getCid());
	}
	public List<Course> findAllCourse(){
		return dao.findAllCourse();
	}
	public Course findOneCourse(Course bean){
		return dao.findOneCourse(bean.getCid());
	}
}
